/**
 * 
 */
package com.wgo.precise.client.ui.controller;

/**
 * @author petterei
 * @version $Id: UniqueClassIdentifier.java,v 1.1 2006-01-31 22:40:30 petterei Exp $
 */
public class UniqueClassIdentifier<T> {
	
	T identifier = null;
	Class uniqueClass = null;
	public UniqueClassIdentifier(T identifier, Class uniqueClass) {
		this.identifier = identifier;
		this.uniqueClass = uniqueClass;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof UniqueClassIdentifier) {
			UniqueClassIdentifier other = (UniqueClassIdentifier) obj;
			return identifier.equals(other.identifier) && uniqueClass.equals(other.uniqueClass);
		}
		return false;
	}
	
	@Override
	public int hashCode() {
		return identifier.hashCode();
	}
	
}